package com.mp.ipm2020.mbg.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.mp.ipm2020.mbg.dao.DeviceDataDao;
import com.mp.ipm2020.mbg.dto.DeviceInfoData;
import com.mp.ipm2020.mbg.model.DeviceData;
import com.mp.ipm2020.mbg.mapper.DeviceDataMapper;
import com.mp.ipm2020.mbg.service.DeviceDataService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 服务实现类
 * </p>
 *
 * @author adidasshe
 * @since 2020-05-18
 */
@Service
public class DeviceDataServiceImpl extends ServiceImpl<DeviceDataMapper, DeviceData> implements DeviceDataService {
    @Autowired
    private DeviceDataDao deviceDataDao;

    @Override
    public DeviceData getByDeviceId(String device_id) {
        return deviceDataDao.getByDeviceID(device_id);
    }

    @Override
    public List<DeviceInfoData> getAllDevice() {

        return deviceDataDao.getDeviceList();
    }
}
